<script type="text/javascript">
function tab_show (obj) {
	var class_name = $(obj).attr('class');
	if(class_name == 'retract') {
		$(obj).attr('class', 'unfold');
		$('#perm_tab').attr('class', 'tab_show');
	} else {
		$(obj).attr('class', 'retract');
		$('#perm_tab').attr('class', 'tab_hide');
	}	
}
</script>
<center><b>{% if $is_show ==1 %}内容查看{%else%}{%$act_title%}表单{%/if%}</b></center>
<form action="index.php?c=admin_user&m={%$act%}&post=1" enctype="multipart/form-data" method=post name=frm>
<table border=1>
		<tr>
		<td>用户名</td>
		<td><input type=text name="admin_user_name" size=30 value='{%$admin_user_name%}' {% if $is_show ==1 %} readonly {%/if%}></td>
	</tr>
	<tr>
		<td>用户密码</td>
		<td>
		<input type="password" name="admin_user_pwd" size=30 value='{%$admin_user_pwd%}' {% if $is_show ==1 %} readonly {%/if%}>{% if $act=="edit"%}不修改密码请不要改动这里{%/if%}
		<input type="hidden" name="reg_admin_user_pwd" value="{%$admin_user_pwd%}">
		</td>
	</tr>
		<tr>
		<td>邮件地址</td>
		<td><input type=text name="admin_user_mail" size=30 value='{%$admin_user_mail%}' {% if $is_show ==1 %} readonly {%/if%}></td>
	</tr>
	<tr>
	<td>员工中文名</td>
	<td><input type=text name="user_name" size=30 value='{%$user_name%}' {% if $is_show ==1 %} readonly {%/if%}></td>
</tr>
<tr>
<td>
	员工英文名
</td>
<td><input type=text name="user_en_name" size=30 value='{%$user_en_name%}' {% if $is_show ==1 %} readonly {%/if%}></td>
</tr>
<tr>
<td>性别</td>
<td>
	<select name=user_sex>
		{%html_options selected=$user_sex options=$sex_arr%}
	</select>	
	</td>
</tr>
<tr>
<td>生日</td>
<td><input type=text name="user_birthday" size=30 value='{%$user_birthday%}' class="input_date_edit txt-normal" dataType="Require" id="user_birthday" readonly>
	<script>
			Calendar.setup({
				inputField     :    "user_birthday",   // id of the input field
				ifFormat       :    "%Y-%m-%d",       // format of the input field
				showsTime      :    false,
				timeFormat     :    "24"
			});
	</script>
	</td>
</tr>
<tr>
<td>工龄</td>
<td><input type=text name="user_Length" size=30 value='{%$user_Length%}' {% if $is_show ==1 %} readonly {%/if%}></td>
</tr>
<tr>
<td>手机</td>
<td><input type=text name="user_mob" size=30 value='{%$user_mob%}' {% if $is_show ==1 %} readonly {%/if%}></td>
</tr>
<tr>
<td>电话</td>
<td><input type=text name="user_tel" size=30 value='{%$user_tel%}' {% if $is_show ==1 %} readonly {%/if%}></td>
</tr>
<tr>
<td>传真</td>
<td><input type=text name="user_fox" size=30 value='{%$user_fox%}' {% if $is_show ==1 %} readonly {%/if%}></td>
</tr>
<tr>
<td>邮箱</td>
<td><input type=text name="user_mail" size=30 value='{%$user_mail%}' {% if $is_show ==1 %} readonly {%/if%}></td>
</tr>
<tr>
<td>QQ</td>
<td><input type=text name="user_qq" size=30 value='{%$user_qq%}' {% if $is_show ==1 %} readonly {%/if%}></td>
</tr>
<tr>
<td>msn</td>
<td><input type=text name="user_msn" size=30 value='{%$user_msn%}' {% if $is_show ==1 %} readonly {%/if%}></td>
</tr>
<tr>
<td>sns</td>
<td><input type=text name="user_sns" size=30 value='{%$user_sns%}' {% if $is_show ==1 %} readonly {%/if%}></td>
</tr>
<tr>
<td>
	身份证号
</td>
<td><input type=text name="user_sfz" size=30 value='{%$user_sfz%}' {% if $is_show ==1 %} readonly {%/if%}></td>
</tr>
<tr>
<td>家庭住址</td>
<td><input type=text name="user_home_address" size=30 value='{%$user_home_address%}' {% if $is_show ==1 %} readonly {%/if%}></td>
</tr>
<tr>
<td>职业情况</td>
<td>
<textarea name="user_work_info" id="textarea" cols="45" rows="5" {% if $is_show ==1 %} readonly {%/if%}>{%$user_work_info%}</textarea>	
</td>
</tr>
<tr>
<td>家庭情况</td>
<td><textarea name="user_home_info" id="textarea" cols="45" rows="5" {% if $is_show ==1 %} readonly {%/if%}>{%$user_home_info%}</textarea>	</td>
</tr>
<tr>
<td>兴趣情况</td>
<td><textarea name="user_intree_info" id="textarea" cols="45" rows="5" {% if $is_show ==1 %} readonly {%/if%}>{%$user_intree_info%}</textarea>	</td>
</tr>
<tr>
<td>学业情况</td>
<td><textarea name="user_studio_info" id="textarea" cols="45" rows="5" {% if $is_show ==1 %} readonly {%/if%}>{%$user_studio_info%}</textarea>	</td>
</tr>
<tr>
<td>是否已婚</td>
<td><select name=user_is_marry>
	{%html_options selected=$user_is_marry options=$is_marry%}
</select></td>
</tr>
<tr>
<td>职务</td>
<td><input type=text name="worker" size=30 value='{%$worker%}' {% if $is_show ==1 %} readonly {%/if%}></td>
</tr>
<tr>
<td>是否为部门负责人</td>
<td>
	<select name="is_depart" id="select">
      <option value="0" >否</option>
      <option value="1" {%if $is_depart%}selected="selected"{%/if%}>是</option>
    </select>
	</td>
</tr>
		<tr>
		<td>是否为管理者</td>
		<td>
			<select name=is_admin>
				{%html_options selected=$is_admin options=$is_admin_arr%}
			</select>
			
		</td>
	</tr>
		<tr>
		<td>所属部门</td>
		<td>
			<select name=department_id>
				
				{%html_options selected=$department_id options=$depart_arr%}
			</select>
			
		</td>
	</tr>
		<tr>
		<td>图片</td>
		<td>
			{%if $is_show%}
			{%if $image_arr%}
			<div id=preview>
				<div class=jqzoom id=spec-n1><IMG height=350
				src="{%$up_load_path%}{%$image_arr.0.image_url%}" jqimg="{%$up_load_path%}{%$image_arr.0.image_url%}" width=350>
				</div>
				<div id=spec-n5>
					<div class=control id=spec-left>
						<img src="{%$pic_path%}left.gif" />
					</div>
					<div id=spec-list>
						<ul class=list-h>
							{%foreach item=image from=$image_arr%}
							<li><img src="{%$up_load_path%}{%$image.image_url%}"> </li>
							{%/foreach%}
		


						</ul>
					</div>
					<div class=control id=spec-right>
						<img src="{%$pic_path%}right.gif" />
					</div>

			    </div>
			</div>
			<SCRIPT type=text/javascript>
				$(function(){			
				   $(".jqzoom").jqueryzoom({
						xzoom:400,
						yzoom:400,
						offset:10,
						position:"right",
						preload:1,
						lens:1
					});
					$("#spec-list").jdMarquee({
						deriction:"left",
						width:350,
						height:56,
						step:2,
						speed:4,
						delay:10,
						control:true,
						_front:"#spec-right",
						_back:"#spec-left"
					});
					$("#spec-list img").bind("mouseover",function(){
						var src=$(this).attr("src");
						$("#spec-n1 img").eq(0).attr({
							src:src.replace("\/n5\/","\/n1\/"),
							jqimg:src.replace("\/n5\/","\/n0\/")
						});
						$(this).css({
							"border":"2px solid #ff6600",
							"padding":"1px"
						});
					}).bind("mouseout",function(){
						$(this).css({
							"border":"1px solid #ccc",
							"padding":"2px"
						});
					});				
				})
				</SCRIPT>





			<SCRIPT src="{%$js_path%}163css.lib.js" type=text/javascript></SCRIPT>

			<SCRIPT src="{%$js_path%}163css.js" type=text/javascript></SCRIPT>
			{%else%}
			暂无图片
			{%/if%}
			{%else%}
			{%foreach item=image from=$image_arr %}
			{%$image.image_url%}--<a href="index.php?c=admin_user&m=del_user_image&image_id={%$image.image_id%}">
				删除
			</a>  <br>
			{%/foreach%}
			<input type="file" name="pictures[]" /><br /> 
			  <input type="file" name="pictures[]" /><br /> 
			  <input type="file" name="pictures[]" /><br />
			{%/if%}
		</td>
	</tr>
	<tr>
		<td>
			涨薪
		</td>
		<td>
			<a href='index.php?c=info_user_wage_log&user_id={%$admin_user_id%}'>
				查看涨薪记录
			</a>
			<br>
			<a href='index.php?c=info_user_wage_log&m=add&user_id={%$admin_user_id%}'>
				添加涨薪
				
			</a>
			
		</td>
	</tr>
		<tr>
		<td>用户状态</td>
		<td>
		<select name="admin_user_state" {% if $is_show ==1 %}disabled{%/if%}>
		{%html_options options=$user_state_arr selected=$admin_user_state %}
		</select>
		</td>
	</tr>
	<tr>
		<td>用户组</td>
		<td>
		<select name="admin_group_id" {% if $is_show ==1 %}disabled{%/if%}>
		{%html_options options=$admin_group_arr selected=$admin_group_id %}
		</select>
		</td>
	</tr>
	<tr>
		<td class="btn_span"><span>权限选择</span><span id="btn_show" class="retract" onclick="tab_show(this)"></span></td>
		<td>		
		<input type="radio" value="0" name="admin_user_permission_type" {%if $admin_user_permission_type==0 %}checked{%/if%}>组权限
		<input type="radio" value="1" name="admin_user_permission_type" {%if $admin_user_permission_type==1 %}checked{%/if%}>单设置
		</td>
	</tr>
</table>
<div id="perm_tab" class="tab_hide">
<table border=1>
	<tr class="txt_center">
		<td>组模块</td>
		<td colspan="5">组权限</td>
	</tr>
	<!--content start-->
	{%create_popedom permission_arr=$permission_arr admin_permission_arr=$admin_group_permission_arr post_name="admin_group_permission"%}
	<!--content end-->
</table>
</div>
{% if $is_show neq 1 %}
<div class="btn_div">
	<input type=hidden name='admin_user_id' id='admin_user_id' value='{%$admin_user_id%}'>
	<input type=submit value="提交" class="btn">&nbsp;&nbsp;
	<input type=reset value="重置" class="btn">
</div>
{% /if %}
</form>

{% if $is_show ==1 %}
<div class="sub_title">用户相关人列表</div>
<table class="show_list">
<tr class="show_title">
	<td>姓名</td>
	<td>英文名</td>
	<td>性别</td>
	<td>职位</td>
	<td>公司名称</td>
	<td>更新人</td>
	<td>更新时间</td>
	<td>操作</td>
</tr>
{%foreach from=$user_list item=arr_item%}
<tr class="{%cycle values="show_line_1,show_line_2"%}">
	<td>{%$arr_item.other_name%}</td>
	<td>{%$arr_item.ohter_en_name%}</td>
	<td>{%$sex_arr[$arr_item.other_sex]%}</td>
	<td>{%$arr_item.other_worker%}</td>
	<td>{%$arr_item.other_company%}</td>
	<td>{%get_user_info user_id=$arr_item.laster%}</td>
	<td>{%$arr_item.update_time|date_format:"%Y-%m-%d"%}</td>
	<td>
	<a href='index.php?c=info_other_user&m=edit&is_show=1&other_id={%$arr_item.other_id%}&type=2'>查看</a>&nbsp;&nbsp;
	<a href='index.php?c=info_other_user&m=edit&other_id={%$arr_item.other_id%}&admin_user_id={%$admin_user_id%}&type=2'>修改</a>&nbsp;&nbsp;
	<a href='index.php?c=info_other_user&m=del&other_id={%$arr_item.other_id%}&admin_user_id={%$admin_user_id%}&type=2' onclick="return confirm('您确认删除吗?')">删除</a>
	</td>
</tr>
{%/foreach%}
</table>
<div class="btn_div">
	<input type="button" value="返回" class="btn" onclick="javascript:history.go(-1);">
</div>
{% /if %}